package cn.gson.crm.controller.emplo;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.gson.crm.controller.BaseServlet;
import cn.gson.crm.model.dao.EmploDao;

/**
 * 删除员工
 */
@WebServlet("/employee/delete")
public class EmploDeleteServlet extends BaseServlet {
	private static final long serialVersionUID = 1L;
    private EmploDao emploDao = new EmploDao();
	@Override
	protected void get(HttpServletRequest request, HttpServletResponse response) throws Exception {
		super.get(request, response);
		
		String[] id = request.getParameterValues("eid");
		for (String eid : id) {
			emploDao.emploDeleteById("删除", Integer.parseInt(eid));
		}
		redirect("employee");
	}

	
}
